<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
       // echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
		Yii::app()->user->setFlash($key, $message);
    }
	$this->widget('bootstrap.widgets.TbAlert', array(
        'block'=>true, // display a larger alert block?
        'fade'=>true, // use transitions?
       'closeText'=>'&times;',
        'alerts'=>array( // configurations per alert type
            'error'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'),// success, info, warning, error or danger
        ),
));
?>

<div class="span7">

<h2>Ingresar</h2>
<div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'login-form',
    'type'=>'horizontal',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note">Los campos con <span class="required">*</span> son obligatorios.</p>

	<?php echo $form->textFieldRow($model,'username'); ?>

	<?php echo $form->passwordFieldRow($model,'password'); ?>

	<?php echo $form->checkBoxRow($model,'rememberMe'); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType'=>'submit',
            'type'=>'primary',
            'label'=>'Identificarse',
        )); ?>
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			//'buttonType'=>'submit',
			'url'=>$this->createUrl('usuarios/registrarse'),
			'label'=>'Registrate',
			//'type'=>'info', // null, 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
			//'size'=>'small', // null, 'large', 'small' or 'mini'
		)); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

</div>